﻿
Namespace LightSwitchApplication

    Public Class AllTransactions

        Private Sub AllTransactions_InitializeDataWorkspace(saveChangesTo As System.Collections.Generic.List(Of Microsoft.LightSwitch.IDataService))
            ' Write your code here.
            Me.AppointmentUserName = Me.Application.User.Name
            clearSearchFields()
        End Sub

        Private Sub ClearFilters_Execute()
            ' Write your code here.
            clearSearchFields()
            Me.AllTransactionsByUser.Load()
        End Sub

        Sub clearSearchFields()
            Me.StartDate = Now
            Me.EndDate = Now
            Me.CustomerProperty = Nothing
        End Sub

        Private Sub ClearFilters_CanExecute(ByRef result As Boolean)
            ' Write your code here.
            result = Me.AllTransactionsByUser.Count > 0
        End Sub
    End Class

End Namespace
